package org.example.factory_method;


public interface INumberFactory {
    Number parse(String s);

    static INumberFactory getFactory(String factory){
        INumberFactory iNumberFactory = null;
        if (factory.equals("INumberFactoryImpl")) {
            iNumberFactory = new INumberFactoryImpl();
        }else if(factory.equals("INumberFactoryImpl2")) {
            iNumberFactory = new INumberFactoryImpl2();
        }
        return iNumberFactory;
    }
}
